<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<html:html lang="true">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<script type="text/javascript" src="bbcalibracaoweb/js/jquery-1.8.2.js"></script>
		<script type="text/javascript" src="bbcalibracaoweb/js/utils.js"></script>
		<script type="text/javascript" src="bbcalibracaoweb/js/jquery.maskedinput-1.2.2.js"></script> 
		<link href="bbcalibracaoweb/css/styleLogin.css" rel="stylesheet" type="text/css">
		<title>BB Calibração - Login</title>
		<script type="text/javascript">
			$(document).ready(function() {
				$('#cpf').mask("999.999.999-99");
				$('#cpf').hide();
				$('#cnpj').mask("99.999.999/9999-99");
				$('#cnpj').show();
				$('#cnpj').focus();
				$('#radioCnpj').attr("checked","checked");
			});
			function toggle(doc){
				if (doc == "cnpj"){
					$('#cpf').hide();
					$('#cnpj').show();
					$('#cnpj').focus();
				} else {
					$('#cnpj').hide();
					$('#cpf').show();
					$('#cpf').focus();
				}
			}
			function btMouseOn(){
				$('#btBuscar').removeClass("btLogin");
				$('#btBuscar').addClass("btLoginHover");
			}
			function btMouseOut(){
				$('#btBuscar').removeClass("btLoginHover");
				$('#btBuscar').addClass("btLogin");
			}
		</script>
	</head>
	<body>
		<div class="divPrincipal">
			<table class="tablePrincipal">
			<tr>
				<td class="tdTablePrincipal">
					<table class="tableLogin, fPadrao" align="center" cellspacing="0" cellpadding="0" style="border: 1px solid #8A9DB1">  
					  <tr>
					  	<td width="16px" height="27px"><html:image src="bbcalibracaoweb/img/barraTitulo-inicio.gif"/></td>
					  	<td height="27px" class="TitleTableLogin"><strong style="color: #FFFFFF;">&nbsp;&nbsp;&nbsp;Busca</strong></td>
					  	<td width="10px" height="27px"><html:image src="bbcalibracaoweb/img/barraTitulo-fim.gif"/></td>
					  </tr>    
					  <tr bgcolor="#DFE9F4">
					  	<td colspan="3" align="center" style="padding-top:5px; padding-bottom:10px; text-align: center;">
					  		<html:form action="EfetivaBusca.do">
					  		<table width="310px" cellpadding="0" cellspacing="4" align="center" class="fPadrao">          
					          <tr>
					            <td colspan="3" align="left" height="30px" style="padding-top:5px; padding-left:20px; border-bottom:2px solid #8A9DB1;"><b>Consulta de calibração de equipamentos</b></td>
					          </tr>
					          <tr>
							  	<td width="20" align="right"><img src="bbcalibracaoweb/img/blank.gif" width="20"></td>
					            <td align="left" height="40px">Para consultar preencha os campos abaixo:</td>
					          </tr>
					          <tr>
					            <td width="20" align="left">&nbsp;</td>
					            <td>
					            	<html:radio property="documento" value="cnpj" styleId="radioCnpj" onclick="javascript: toggle('cnpj');" />&nbsp;CNPJ&nbsp;
					            	<html:radio property="documento" value="cpf" styleId="radioCpf" onclick="javascript: toggle('cpf');" />&nbsp;CPF&nbsp;
					            </td>
					            <td width="20" align="left">&nbsp;</td>
					          </tr>
					          <tr>
					            <td width="20" align="left">&nbsp;</td>
					            <td><html:text property="cnpj" styleId="cnpj" styleClass="fundoTextBox"/><html:text property="cpf" styleId="cpf" styleClass="fundoTextBox" value=""/></td>
					            <td width="20" align="left">&nbsp;</td>
					          </tr>
					          <tr>
					          	<td width="20" align="left">&nbsp;</td>
							  	<td align="right"><table width="100%" class="fPadrao"><tr>
								<td style="text-align: left;" class="mensagemErro">${form.mensagem}&nbsp;</td>
								<td style="text-align: right;"><html:submit value="Buscar" styleClass="btLogin" styleId="btBuscar" onmouseover="javascript: btMouseOn();" onmouseout="javascript: btMouseOut();" /></td>
								</tr></table></td>
					          </tr>
				       		</table>
				       		</html:form>
				       	</td>
					  </tr>
					</table>
				</td>
			</tr>
			</table>
		</div>
	</body>
</html:html>

